package com.neonbacon.snake;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;

public class InGameActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		ScoreView.score = 0;
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.ingamelayout);
		final InGame game = (InGame) findViewById(R.id.inGame1);
		findViewById(R.id.up).setOnClickListener(new OnClickListener() {
			public void onClick(View arg0) {
              game.l.s.setDir(EntitySnake.DIR_UP);
			}
		});
		findViewById(R.id.down).setOnClickListener(new OnClickListener() {
			public void onClick(View arg0) {
              game.l.s.setDir(EntitySnake.DIR_DOWN);
			}
		});
		findViewById(R.id.left).setOnClickListener(new OnClickListener() {
			public void onClick(View arg0) {
              game.l.s.setDir(EntitySnake.DIR_LEFT);
			}
		});
		findViewById(R.id.right).setOnClickListener(new OnClickListener() {
			public void onClick(View arg0) {
              game.l.s.setDir(EntitySnake.DIR_RIGHT);
			}
		});
	}
}